﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebNetCorePhoneErp.Model;

namespace WebNetCorePhoneErp.IBLL
{
    /// <summary>
    /// 分类-业务逻辑
    /// </summary>
    /// <remarks>
    /// 作者：王浩力
    /// 创建时间：2021-6-11 17:50:33
    /// </remarks>
    public interface ICategoryBusiness
    {
        /// <summary>
        /// 新增分类
        /// </summary>
        /// <param name="category"></param>
        /// <param name="userView"></param>
        /// <returns></returns>
        Task<Result> AddCategoryAsync(Category category, UserView userView);

        /// <summary>
        /// 修改分类
        /// </summary>
        /// <param name="category"></param>
        /// <param name="userView"></param>
        /// <returns></returns>
        /// <remarks>
        /// 创建时间：2021-6-15 10:53:16
        /// 作者：王浩力
        /// </remarks>
        Task<Result> UpdateCategoryAsync(Category category, UserView userView);

        /// <summary>
        /// 根据父级id，获取子集
        /// </summary>
        /// <param name="parentId">父级id</param>
        /// <returns></returns>
        /// <remarks>
        /// 创建时间：2021-6-15 10:53:16
        /// 作者：王浩力
        /// </remarks>
        Task<Result> GetChildCategoryAsync(string parentId);


    }
}
